package lambda.model;

import java.util.Objects;

public class Student {
    private String name;
    public Student() {
        System.out.println("无参构造");
    }
    public Student(String name) {
        this.name = name;
        System.out.println("有参构造");
    }
    //成员方法
    public void sayHasArgs(int o) {
        System.out.println("有参实例方法,o="+o);
    }
    public void sayNoArgs() {
        System.out.println("无参实例方法");
    }

    //静态方法
    public static void noArgsStatic(){
        System.out.println("无参静态方法");
    }
    public static void hasArgsStatic(int o){
        System.out.println("有参静态方法,o="+o);
    }
    //实例方法


    public void equals(Student o) {
        System.out.println("实例化方法name比较结果"+this.name.equals(o.getName()));
    }



    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
